package com.knowledge.common.enums;

/**
 * @author zzz
 * @create 2022-02-11 14:26
 */

@SuppressWarnings("all")
public enum  ErrorCode {

    PARAMS_ERROR(10001,"参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002,"用户名或密码不存在"),
    NO_PERMISSION(70001,"无访问权限"),
    SESSION_TIME_OUT(90001,"会话超时"),
    NO_LOGIN(90002,"未登录"),
    TOKEN_ERROR(10003,"Token不合法"),
    ACCOUNT_EXIST(10004,"账户已存在"),
    APPLY_ADD_FRIEND_ERROR(10005,"申请添加好友错误，自己不能添加自己"),
    AGREE_FRIEND_APPLY_ERROR(10006,"同意好友申请错误，好友申请ID错误"),
    NEWS_READ_ID_ERROR(10007,"消息标记已读的ID错误"),
    SHARE_ERROR(10008,"分享错误，不能分享给自己"),
    SHARE_ERROR_ARTICLE_DELETE(10009,"分享错误，文章已被删除"),
    ACCOUNT_PWD_ERRROR(10010,"密码不正确"),
    CHECK_PWD_ERRROR(10011,"两次输入密码不一致"),
    ARTICLE_NOT_EXIST(10012,"文章不存在或已被删除")
    ;

    private int code;
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}

